package com.xawl.dao;

import com.xawl.pojo.PopularNav;
import com.xawl.pojo.Question;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface QuestionMapper {

    Integer getTotal();  //获取总记录数

    int addQuestion(Question question);

    int deleteQuestion(@Param("id") int q_id);

    int deleteQuestions(Long[] ids);

    int updateQuestion(Question question);

    //根据问题标题进行模糊查询
    List<Question> searchQuestion(@Param("title") String q_title);

    List<Question> queryAll();

    Question findQuestionById(@Param("id")int id);

}
